<template>
  <div class="rank absolute">
    <div class="header">
      <div class="back">
        <img
          src="http://diandian.zgkpz.com/images/user/back.png"
          @click="back"
        />
      </div>
      <div class="title">
        <img src="http://diandian.zgkpz.com/images/m_rank/title.png" />
      </div>
    </div>
    <div class="main">
      <div class="rank_top">
        <div class="second">
          <div class="content">
            <img src="http://diandian.zgkpz.com/images/m_rank/touxiang.png" />
            <p class="main-one-name">鲤鱼王2</p>
            <div class="main-one">3222</div>
          </div>
        </div>
        <div class="first">
          <div class="content">
            <img src="http://diandian.zgkpz.com/images/m_rank/touxiang.png" />
            <p>鲤鱼王1</p>
            <div class="main-two">3222</div>
          </div>
        </div>
        <div class="three">
          <div class="content">
            <img src="http://diandian.zgkpz.com/images/m_rank/touxiang.png" />
            <p>鲤鱼王3</p>
            <div class="main-three">3222</div>
          </div>
        </div>
      </div>

      <div>
        <img
          src="http://diandian.zgkpz.com/images/m_rank/table.png"
          class="table"
        />
        <div class="rank_list">
          <ul v-for="(item, index) in list" :key="index">
            <li>
              <span>{{ item.id }}</span>
              <img src="http://diandian.zgkpz.com/images/m_rank/touxiang.png" />
              <span>{{ item.name }}</span>
              <span>{{ item.score }}</span>
              <span>{{ item.score }}</span>
              <span>{{ item.score }}</span>
            </li>
          </ul>
        </div>
      </div>
      <div class="zongjie">
        <span> 我的排名</span>
        <span> 未上榜</span>
        <span> 888</span>
        <span> 888</span>
        <span> 888</span>
      </div>
    </div>

    <div class="footer_var">
      <img
        src="http://diandian.zgkpz.com/images/m_rank/allrank.png"
        @click="rank"
      />
      <img
        src="http://diandian.zgkpz.com/images/m_rank/dayrank.png"
        @click="huiben"
      />
      <img
        src="http://diandian.zgkpz.com/images/m_rank/classrank.png"
        @click="gendu"
      />
    </div>
  </div>
</template>
<script>
export default {
  name: "Login",
  data: function () {
    return {
      list: [
        { id: 1, name: "李佳航", score: 888 },
        { id: 2, name: "李佳航", score: 888 },
        { id: 3, name: "李佳航", score: 888 },
        { id: 4, name: "李佳航", score: 888 },
        { id: 5, name: "李佳航", score: 888 },
        { id: 6, name: "李佳航", score: 888 },
        { id: 6, name: "李佳航", score: 888 },
        { id: 6, name: "李佳航", score: 888 },
        { id: 6, name: "李佳航", score: 888 },
      ],
      list1: [
        { id: 1, name: "权贵", score: 333 },
        { id: 2, name: "权贵", score: 333 },
        { id: 3, name: "权贵", score: 333 },
        { id: 4, name: "权贵", score: 333 },
      ],
      list2: [
        { id: 1, name: "欧时力", score: 666 },
        { id: 2, name: "欧时力", score: 666 },
        { id: 3, name: "欧时力", score: 66 },
        { id: 4, name: "欧时力", score: 66 },
      ],
    };
  },
  created() {
    window.addEventListener("resize", this.handleResize);
  },
  mounted: function () {},
  methods: {
    handleResize() {
      if (document.body.clientWidth >= 770) {
        this.$router.replace({ path: "/web/rank" });
      }
    },
    back() {
      this.$router.replace({ path: "/" });
    },
    rank() {
      this.list = [
        { id: 1, name: "李佳航", score: 888 },
        { id: 2, name: "李佳航", score: 888 },
        { id: 3, name: "李佳航", score: 888 },
        { id: 3, name: "李佳航", score: 888 },
        { id: 3, name: "李佳航", score: 888 },
        { id: 4, name: "李佳航", score: 888 },
      ];
    },
    huiben() {
      this.list = this.list1;
    },
    gendu() {
      this.list = this.list2;
    },
  },
};
</script>
<style scoped>
.code img {
  width: 100%;
  height: 100%;
}
.header {
  width: 100%;
  float: left;
}
.back {
  padding-left: 0.3rem;
  padding-top: 0.3rem;
  width: 1rem;
  float: left;
}
.back img {
  width: 0.65rem;
}
.title {
  width: 6rem;
  text-align: center;
}
.title img {
  width: 3rem;
  margin-top: -0.3rem;
}
.main {
  font-family: SimHei;
  text-align: center;
}
.rank_top {
  width: 6rem;
  display: inline-flex;
  justify-content: space-around;
  background: url("http://diandian.zgkpz.com/images/m_rank/dizuo.png") no-repeat;
  background-size: 100%;
  height: 3rem;
  background-position-y: 1.2rem;
}
.kk img {
  width: 2rem;
}
.kuang p {
  color: #ffffff;
}
.table {
  width: 5.5rem;
}
.rank_list {
  height: 6.4rem;
  overflow-y: auto;
  background: url("http://diandian.zgkpz.com/images/m_rank/drakback.png")
    no-repeat;
  background-size: 100%100%;
  width: 82%;
  margin: 0 auto;
}
.rank_list ul li {
  background: #f8eddc;
  display: inline-flex;
  justify-content: space-around;
  color: #cb5425;
  width: 99%;
  margin: 1px 0;
  height: 0.75rem;
  line-height: 0.75rem;
  border-radius: 3px;
  font-weight: bold;
}
.rank_list ul li img {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.1rem;
}
.rank_list ul li span {
  width: 1.5rem;
}
.zongjie {
  background: url("http://diandian.zgkpz.com/images/m_rank/juxing.png")
    no-repeat;
  background-size: 100%;
  display: inline-flex;
  justify-content: space-around;
  width: 82%;
  height: 0.9rem;
  line-height: 0.9rem;
  font-size: 0.3rem;
  color: #cb5425;
  font-weight: 900;
}
.footer_var {
  position: fixed;
  bottom: 0.2rem;
  width: 100%;
  text-align: center;
}
.footer_var img {
  width: 1.3rem;
  height: 1rem;
  margin: 0 0.2rem;
}
.first {
  background: url("http://diandian.zgkpz.com/images/m_rank/first.png") no-repeat;
  background-size: 100%100%;
  width: 1.8rem;
  height: 2.8rem;
  position: relative;
  bottom: 0.1rem;
}
.second {
  background: url("http://diandian.zgkpz.com/images/m_rank/second.png")
    no-repeat;
  background-size: 100%100%;
  width: 1.6rem;
  height: 2.5rem;
  position: relative;
  top: 0.2rem;
  left: 0.38rem;
}
.three {
  background: url("http://diandian.zgkpz.com/images/m_rank/third.png") no-repeat;
  background-size: 100%100%;
  width: 1.6rem;
  height: 2.5rem;
  position: relative;
  top: 0.2rem;
  right: 0.38rem;
}
.content {
  text-align: center;
}
.content img {
  width: 0.75rem;
  margin-top: 0.2rem;
}
.content p {
  color: #ffffff;
  font-size: 0.2rem;
  position: relative;
  top: -0.2rem;
  font-weight: 900;
}
.content div {
  display: inline-block;
  background: url("http://diandian.zgkpz.com/images/m_rank/star.png") no-repeat;
  background-size: 0.3rem;
  width: 1rem;
  color: #ffffff;
  font-size: 0.2rem;
  position: relative;
  top: -0.2rem;
}


.content .main-one{
    top: -0.24rem;
    color: #ffff;
    text-shadow: 3px 3px 12px #f7f30b;
}

.content .main-two{
    top: -0.33rem;
    color: #ffff;
    text-shadow: 3px 3px 12px #f7f30b;
}

.content .main-three{
    top: -0.34rem;
    color: #ffff;
    text-shadow: 3px 3px 12px #f7f30b;
}



@media screen and (min-height: 750px) {
}

@media (min-height: 770px) and (min-height: 1024px) {
  .rank_top {
    margin-top: 0;
    width: 4rem;
    height: 2.5rem;
  }
  .first {
    height: 2rem;
  }
  .second {
    height: 2rem;
  }
  .three {
    height: 2rem;
  }
  .content img {
    margin-top: 0.1rem;
  }
  .table {
    width: 6rem;
  }
  .footer_var {
    position: fixed;
    bottom: 0;
  }
}
</style>
